package com.aigou.controller;

import com.aigou.dao.BrandMapper;
import com.aigou.pojo.Brand;
import com.aigou.pojo.Goods;
import com.aigou.pojo.PageResult;
import com.aigou.pojo.Result;
import com.aigou.service.BrandService;
import com.aigou.service.GoodsService;
import com.github.pagehelper.PageInfo;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Controller
@RequestMapping("/brand")
@CrossOrigin
public class BrandController {

    @Autowired
    BrandService brandService ;

    @RequestMapping(value = "/findAll", method = RequestMethod.GET)
    @ResponseBody
    public Result findAll(Brand brand) {

        Result result = new Result();
        result.setData(brandService.findAll());
        return result;
    }
    
    @PostMapping(value = "/add")
    @ResponseBody
    public Result add(Brand brand) {
    	
    	Result result = new Result();
    	return result;
    }
    
    @PutMapping(value = "/update")
    @ResponseBody
    public Result update(Brand brand) {
    	Result result = new Result();
    	return result;
    }
    
    @DeleteMapping(value = "/delete/{id}")
    @ResponseBody
    public Result delete(@PathVariable("id") Integer id) {
    	Result result = new Result();
    	return result;
    }
    
    @GetMapping(value = "/findOne/{id}")
    @ResponseBody
    public Result findOne(@PathVariable("id") Integer id) {
    	Result result = new Result();
    	return result;
    }

}
